package com.wnxy.admin.controller;

import com.wnxy.admin.common.ResponseResult;
import com.wnxy.admin.dto.PermissionMenuVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import com.wnxy.admin.entity.Permission;
import com.wnxy.admin.service.IPermissionService;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 权限表 前端控制器
 * </p>
 *
 * @author All
 * @since 2023-11-29
 */
@RestController
@RequestMapping("/permission")
public class PermissionController {

    private final IPermissionService permissionServiceImpl;
    public PermissionController(IPermissionService permissionServiceImpl){
        this.permissionServiceImpl = permissionServiceImpl;
    }

    @GetMapping("/findAll")
    public ResponseResult findAll(){
        List<PermissionMenuVO> list = permissionServiceImpl.findAll();
        return ResponseResult.ok(list);
    }

}
